<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<span>我是老王</span>
<span>我是老王</span>
<span>我是老王</span>
<span>我是老王</span>
<em>123</em>
<em>123</em>
<p>我是分割线</p>
<span>我是老王</span>
<span>我是老王</span>
<span>我是老王</span>
<span>我是老王</span>
<em>123</em>
<em>123</em>
</body>
</html>
<script src="js/jquery-1.10.1.js"></script>
<script>
    $(function(){
        $("p").nextUntil("em").css("color","yellow");
    })
</script>